package pl.edu.agh.neurony.logic.activationFunctions;

public class SigmoidalFunc implements ActivationFunc {

	private double beta = 1;
	
	@Override
	public double run(double input) {
		return 1.0/(1.0 + Math.exp(-1.0 *beta * input));
	}
	
	@Override
	public double derivative(double input) {
		double value = run(input);
		return (1.0 - value) * value;
	}

	@Override
	public String getName() {
		return "sigmoid";
	}
	
	@Override
	public String toString() {
		return getName();
	}

}
